#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>

int main()
{
	int ret = 0;

	struct stat st;

	memset(&st,0,sizeof(struct stat));

	ret = stat("./exam.txt",&st);
	if(ret == -1)
	{
		perror("stat");
		exit(-1);
	}

	printf("size is %ld\n",st.st_size);

	return 0;

}
